#!/usr/bin/env python3

def loadDict():
    flags = True
    dictData = {}

    for line in open('./ciku.dict'):
        line  = line.rstrip('\n')

        if flags:
            key = line
        else:
            dictData[key] = line

        flags = not flags

    return dictData

def main():
    dictData = loadDict()

    while True:
        findWord = input("请输入查询英文单词: ")

        if findWord == "exit":
            break
        if findWord in dictData:
            print(dictData[findWord])

if __name__ == "__main__":
    main()
